package cn.net.xyan.facerecognition.dao

import cn.net.xyan.facerecognition.entity.*
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
import org.springframework.data.jpa.repository.Query

interface UserDao :JpaRepository<User,String>, JpaSpecificationExecutor<User>{
    fun findByUsername(username:String):User?

    @Query("select u from User u join u.faces f where f.label = ?1")
    fun findByLabel(label:Int?):User?
}